// let config = wx.getExtConfigSync();
// let config = JSON.stringify(wx.getExtConfigSync()) !== '{}' ? wx.getExtConfigSync() : require('../../config.js');
let { config } = require('../../common/utils/ws/ws-config.js');

let _api_root = config.domain + 'addons/ws_micro_shop/core/web/index.php?r=api/';

let api = {
  index: _api_root + 'default/index',
  default: {
    shopSetting: _api_root + 'default/custom',
    copyright: _api_root + 'default/copyright',
    store: _api_root + 'default/store',
    index: _api_root + 'default/index',
    index_new: _api_root + 'default/index-new',
    visual_index: _api_root + 'default/visual-index',
    goods_list: _api_root + 'default/goods-list',
    goods_search: _api_root + 'default/goods-search',
    catstyle: _api_root + 'default/page-style',
    cat_list: _api_root + 'default/cat-list',
    goods: _api_root + 'default/goods',
    district: _api_root + 'default/district',
    goods_attr_info: _api_root + 'default/goods-attr-info',
    upload_image: _api_root + 'default/upload-image',
    comment_list: _api_root + 'default/comment-list',
    article_list: _api_root + 'default/article-list',
    article_detail: _api_root + 'default/article-detail',
    video_list: _api_root + 'default/video-list',
    goods_qrcode: _api_root + 'default/goods-qrcode',
    coupon_list: _api_root + 'default/coupon-list',
    topic_list: _api_root + 'default/topic-list',
    topic: _api_root + 'default/topic',
    navbar: _api_root + 'default/navbar',
    navigation_bar_color: _api_root + 'default/navigation-bar-color',
    shop_list: _api_root + 'default/shop-list',
    shop_detail: _api_root + 'default/shop-detail',
    topic_type: _api_root + 'default/topic-type',
    buy_data: _api_root + 'default/buy-data',
    orderClerk: _api_root + 'order/is-clerk',
    topicLetter: _api_root + 'default/message-submit',
    facepay: _api_root + 'onpay/index',
    paymoney: _api_root + 'onpay/pay',
    faceuse: _api_root + 'onpay/get-coupon',
    leavemsg: _api_root + 'default/message',
    signsetting: _api_root + 'integral/index/get-setting',
    signin: _api_root + 'integral/index/explain',
    signin_submit: _api_root + 'integral/index/register',
    integral_rank: _api_root + 'integral/index/integral-rank',
    getattr: _api_root + 'default/get-attr',
    storehome: _api_root + 'default/notice-list',
    storelist: _api_root + 'default/shop-list',
    bindmember: _api_root + 'default/shop-user',
    storeapply: _api_root + 'default/apply',
    topicqrcode: _api_root + 'default/topic-qrcode',
    hotsearch: _api_root + 'default/hot-keyword',
    getcomment: _api_root + 'default/get-comment',
    replycomment: _api_root + 'default/comment-to',
    shopqrcode: _api_root + 'default/get-qrcode',
    feedback: _api_root + 'default/add-wish',
    recommend: _api_root + 'default/goods-recommend',
    nearstore: _api_root + 'default/recent-shop',
    storecate: _api_root + 'default/category-list',
    noticelist: _api_root + 'default/get-notice-list',
    coornate: _api_root + 'default/get-coornate',
    guide_coupon: _api_root + 'default/guide-coupon',
    province_city: _api_root + 'default/province-city',
  },
  cart: {
    edit: _api_root + 'cart/edit',
    list: _api_root + 'cart/list',
    listNew: _api_root + 'cart/list-new',
    add_cart: _api_root + 'cart/add-cart',
    delete: _api_root + 'cart/delete',
    cart_edit: _api_root + 'cart/cart-edit',
    cart_account: _api_root + 'cart/cart-account',
    scanadd: _api_root + 'cart/addbycode',
    get_cart_num: _api_root + 'cart/get-cart-num',
  },
  passport: {
    login: _api_root + 'passport/login',
    login2: _api_root + 'passport/login2',
    on_login: _api_root + 'passport/on-login',
    info: _api_root + 'passport/info',
    bind_mobile: _api_root + 'passport/bind-mobile',
  },
  order: {
    submit_preview: _api_root + 'order/submit-preview',
    submitPreviewNew: _api_root + 'order/submit-preview-new',
    shop_list: _api_root + 'order/shop-list',
    wheel: _api_root + 'order/wheel',
    submit: _api_root + 'order/submit',
    submitNew: _api_root + 'order/submit-new',
    pay_data: _api_root + 'order/pay-data',
    payDataNew: _api_root + 'order/pay-data-new',
    list: _api_root + 'order/list',
    listNew: _api_root + 'order/list-new',
    listNew_all: _api_root + 'order/list-all-new',
    revoke: _api_root + 'order/revoke',
    confirm: _api_root + 'order/confirm',
    count_data: _api_root + 'order/count-data',
    detail: _api_root + 'order/detail',
    detailNew: _api_root + 'order/detail-new',
    refund_preview: _api_root + 'order/refund-preview',
    refund: _api_root + 'order/refund',
    refund_detail: _api_root + 'order/refund-detail',
    comment_preview: _api_root + 'order/comment-preview',
    comment: _api_root + 'order/comment',
    express_detail: _api_root + 'order/express-detail',
    clerk: _api_root + 'order/clerk',
    clerk_detail: _api_root + 'order/clerk-detail',
    get_qrcode: _api_root + 'order/get-qrcode',
    location: _api_root + 'order/location',
    dispatch: _api_root + 'order/delivery-detail',
    uploadcard: _api_root + 'order/get-cardid',
    againorder: _api_root + 'order/onemore',
    deleteorder: _api_root + 'order/delete',
    change_price: _api_root + 'order/add-price',
    send_finish: _api_root + 'order/send-finish',
    pay_type: _api_root + 'order/pay-type',
    cycle_detail: _api_root + 'order/cycle-express-detail',
    cycle_confirm: _api_root + 'order/cycle-order-confirm',
  },
  user: {
    address_list: _api_root + 'user/address-list',
    address_detail: _api_root + 'user/address-detail',
    address_save: _api_root + 'user/address-save',
    address_brain: _api_root + 'user/address-brain',
    address_set_default: _api_root + 'user/address-set-default',
    address_delete: _api_root + 'user/address-delete',
    save_form_id: _api_root + 'user/save-form-id',
    favorite_add: _api_root + 'user/favorite-add',
    favorite_remove: _api_root + 'user/favorite-remove',
    favorite_list: _api_root + 'user/favorite-list',
    index_new: _api_root + 'user/index-new',
    index: _api_root + 'user/index',
    wechat_district: _api_root + 'user/wechat-district',
    add_wechat_address: _api_root + 'user/add-wechat-address',
    topic_favorite: _api_root + 'user/topic-favorite',
    topic_favorite_list: _api_root + 'user/topic-favorite-list',
    member: _api_root + 'user/member',
    card: _api_root + 'user/card',
    card_qrcode: _api_root + 'user/card-qrcode',
    card_clerk: _api_root + 'user/card-clerk',
    footpoint: _api_root + 'user/get-track',
    deltrack: _api_root + 'user/delete-track',
    edit_info: _api_root + 'user/save-birthday',
    userbind: _api_root + 'user/bind',
    getcheckcode: _api_root + 'user/get-code',
    scoredetail: _api_root + 'user/score-detail',
    getactiveid: _api_root + 'user/favorite-ms-goods',
    clerk_info: _api_root + 'user/clerk-info',
    withdraw: _api_root + 'user/withdraw',
    member_card_setting: _api_root + 'user/get-member-card-setting',
    buy_member_card: _api_root + 'user/buy-member-card',
    get_user_member_card: _api_root + 'user/get-user-member-card',
    search: _api_root + 'user/search',
  },
  share: {
    join: _api_root + 'share/join',
    check: _api_root + 'share/check',
    get_info: _api_root + 'share/get-info',
    get_price: _api_root + 'share/get-price',
    apply: _api_root + 'share/apply',
    cash_detail: _api_root + 'share/cash-detail',
    get_qrcode: _api_root + 'share/get-qrcode',
    get_qrcode_new: _api_root + 'share/get-qrcode-new',
    shop_share: _api_root + 'share/shop-share',
    bind_parent: _api_root + 'share/bind-parent',
    get_team: _api_root + 'share/get-team',
    get_order: _api_root + 'share/get-order',
    save_info: _api_root + 'share/save-info',
    bind_guide: _api_root + 'share/bind-guide',
    get_content: _api_root + 'share/get-content',
  },
  wheel: {
    index: _api_root + 'wheel/index',
  },
  coupon: {
    index: _api_root + 'coupon/index',
    share_send: _api_root + 'coupon/share-send',
    receive: _api_root + 'coupon/receive',
    exchange: _api_root + 'coupon/exchange',
  },
  miaosha: {
    list: _api_root + 'miaosha/list',
    goods_list: _api_root + 'miaosha/goods-list',
    details: _api_root + 'miaosha/details',
    submit_preview: _api_root + 'miaosha/submit-preview',
    submit: _api_root + 'miaosha/submit',
    pay_data: _api_root + 'miaosha/pay-data',
    order_list: _api_root + 'miaosha/order-list',
    order_details: _api_root + 'miaosha/order-details',
    order_revoke: _api_root + 'miaosha/revoke',
    express_detail: _api_root + 'miaosha/express-detail',
    confirm: _api_root + 'miaosha/confirm',
    comment_preview: _api_root + 'miaosha/comment-preview',
    comment: _api_root + 'miaosha/comment',
    refund_preview: _api_root + 'miaosha/refund-preview',
    refund: _api_root + 'miaosha/refund',
    refund_detail: _api_root + 'miaosha/refund-detail',
    comment_list: _api_root + 'miaosha/comment-list',
    goods_qrcode: _api_root + 'miaosha/goods-qrcode',
    favorite_add: _api_root + 'miaosha/favorite-add',
    favorite_remove: _api_root + 'miaosha/favorite-remove',
  },
  guide: {
    index: _api_root + 'guide/index',
    perform_index_shop: _api_root + 'guide/performance-index-shop',
    perform_index: _api_root + 'guide/performance-index',
    perform_edit: _api_root + 'guide/performance-edit',
    perform: _api_root + 'guide/performance',
    target_submit_preview: _api_root + 'guide/target-submit-preview',
    target_submit: _api_root + 'guide/target-submit',
    task_submit_preview: _api_root + 'guide/task-submit-preview',
    task_submit: _api_root + 'guide/task-submit',
    target_list: _api_root + 'guide/target-list',
    week_report: _api_root + 'guide/week-report',
    edit_followup: _api_root + 'guide/edit-followup',
    share_submit: _api_root + 'guide/share-submit',
    cunstomer_contact: _api_root + 'guide/cunstomer-contact',
    cunstomer: _api_root + 'guide/cunstomer',
    target_detail: _api_root + 'guide/target-detail',
    goods_list: _api_root + 'guide/goods-list',
    get_external_userid: _api_root + 'guide/get-external-userid',
    get_user_role: _api_root + 'guide/get-user-role-info',
    get_guide_user_role: _api_root + 'guide/get-guide-user-role',
  },
  staff: {
    bind_client: _api_root + 'staff/index/bind-client',
    index: _api_root + 'staff/staff/index',
    week_report: _api_root + 'staff/staff/week-report',
    achieve: _api_root + 'staff/staff/achieve',
    performance_index_shop: _api_root + 'staff/staff/performance-index-shop',
    performance_index: _api_root + 'staff/staff/performance-index',
    performance_edit: _api_root + 'staff/staff/performance-edit',
    performance: _api_root + 'staff/staff/performance',
    submit_preview: _api_root + 'staff/staff/submit-preview',
    target_detail: _api_root + 'staff/staff/target-detail',
    target_list: _api_root + 'staff/staff/target-list',
    target_submit: _api_root + 'staff/staff/target-submit',
    task_submit: _api_root + 'staff/staff/task-submit',
    edit_followup: _api_root + 'staff/staff/edit-followup',
    share_submit: _api_root + 'staff/staff/share-submit',
    share: _api_root + 'staff/share',
    cunstomer: _api_root + 'staff/share/cunstomer',
    coupons_qrcode: _api_root + 'staff/share/coupons-qrcode',
    goods_qrcode: _api_root + 'staff/share/goods-qrcode',
    topic_qrcode: _api_root + 'staff/share/topic-qrcode',
    coupon_list: _api_root + 'staff/share/coupon-list',
    clue_index: _api_root + 'staff/clue/index',
    clue_list: _api_root + 'staff/clue/list',
    clue_edit: _api_root + 'staff/clue/edit',
    clue_user_detail: _api_root + 'staff/clue/user-detail',
    clue_user_label: _api_root + 'staff/clue/user-label',
    clue_info: _api_root + 'staff/clue/info',
    clue_consume: _api_root + 'staff/clue/consume',
    get_is_role: _api_root + 'staff/index/get-is-role',
    category_list: _api_root + 'staff/category/get-list'
  },
  clue: {
    user_detail: _api_root + 'clue/user-detail',
    index: _api_root + 'clue/index',
    info: _api_root + 'clue/info',
    consume: _api_root + 'clue/consume',
    list: _api_root + 'clue/list',
    edit: _api_root + 'clue/edit',
  },
  chat: {
    list: _api_root + 'chat/list',
  },
  label: {
    index: _api_root + 'label/index',
    submit: _api_root + 'label/submit',
    user_label: _api_root + 'label/user-label',
    user_edit: _api_root + 'label/user-edit',
  },

  group: {
    index: _api_root + 'group/index/index',
    list: _api_root + 'group/index/good-list',
    details: _api_root + 'group/index/good-details',
    goods_attr_info: _api_root + 'group/index/goods-attr-info',
    submit_preview: _api_root + 'group/order/submit-preview',
    submit: _api_root + 'group/order/submit',
    pay_data: _api_root + 'group/order/pay-data',
    order: {
      list: _api_root + 'group/order/list',
      detail: _api_root + 'group/order/detail',
      express_detail: _api_root + 'group/order/express-detail',
      comment_preview: _api_root + 'group/order/comment-preview',
      comment: _api_root + 'group/order/comment',
      confirm: _api_root + 'group/order/confirm',
      goods_qrcode: _api_root + 'group/order/goods-qrcode',
      get_qrcode: _api_root + 'group/order/get-qrcode',
      clerk: _api_root + 'group/order/clerk',
      clerk_order_details: _api_root + 'group/order/clerk-order-details',
      revoke: _api_root + 'group/order/revoke',
      refund_preview: _api_root + 'group/order/refund-preview',
      refund: _api_root + 'group/order/refund',
      refund_detail: _api_root + 'group/order/refund-detail',
    },
    group_info: _api_root + 'group/order/group',
    comment: _api_root + 'group/index/goods-comment',
    goods_qrcode: _api_root + 'group/index/goods-qrcode',
    search: _api_root + 'group/index/search',
  },
  book: {
    index: _api_root + 'book/index/index',
    list: _api_root + 'book/index/good-list',
    details: _api_root + 'book/index/good-details',
    submit_preview: _api_root + 'book/order/submit-preview',
    submit: _api_root + 'book/order/submit',
    order_list: _api_root + 'book/order/list',
    order_cancel: _api_root + 'book/order/cancel',
    order_pay: _api_root + 'book/order/pay-data',
    order_details: _api_root + 'book/order/order-details',
    shop_list: _api_root + 'book/index/shop-list',
    get_qrcode: _api_root + 'book/order/get-qrcode',
    clerk: _api_root + 'book/order/clerk',
    apply_refund: _api_root + 'book/order/apply-refund',
    comment_preview: _api_root + 'book/order/comment-preview',
    submit_comment: _api_root + 'book/order/comment',
    goods_comment: _api_root + 'book/index/goods-comment',
    goods_qrcode: _api_root + 'book/index/goods-qrcode',
    clerk_order_details: _api_root + 'book/order/clerk-order-details',
    count_search: _api_root + 'book/order/date-search',
  },
  quick: {
    quick: _api_root + 'quick/quick/quick',
    quick_goods: _api_root + 'quick/quick/quick-goods',
    quick_car: _api_root + 'quick/quick/quick-car',
    quick_cat: _api_root + 'quick/quick/quick-cat',
  },
  fxhb: {
    open: _api_root + 'fxhb/index/open',
    list: _api_root + 'fxhb/index/list',
    open_submit: _api_root + 'fxhb/index/open-submit',
    detail: _api_root + 'fxhb/index/detail',
    detail_submit: _api_root + 'fxhb/index/detail-submit',
    hb_records: _api_root + 'fxhb/index/hb-records',
  },
  recharge: {
    index: _api_root + 'recharge/index',
    list: _api_root + 'recharge/list',
    submit: _api_root + 'recharge/submit',
    record: _api_root + 'recharge/record',
    info: _api_root + 'recharge/info',
    balance_list: _api_root + 'recharge/balance-list',
    integral_list: _api_root + 'recharge/integral-list',
    virtual_card: _api_root + 'recharge/virtual-recharge',
    virtual_record: _api_root + 'recharge/virtual-record',
    virtual_msg: _api_root + 'recharge/send-virtual-msg',
    virtual_error: _api_root + 'recharge/error-record',
  },
  adminer: {
    index: _api_root + 'adminer/index',
    list: _api_root + 'adminer/order-list',
    revoke: _api_root + 'adminer/revoke',
    pay: _api_root + 'adminer/pay',
    goodslist: _api_root + 'adminer/goods',
    new_goods: _api_root + 'adminer/new-goods',
    operate: _api_root + 'adminer/goods-operate',
    miaoshaRevoke: _api_root + 'adminer/ms-revoke',
    ptRevoke: _api_root + 'adminer/pt-revoke',
    robotList: _api_root + 'adminer/robot',
    addRobot: _api_root + 'adminer/add-robot',
    expressList: _api_root + 'adminer/express-list',
    sendout: _api_root + 'adminer/send',
    goodsEdit: _api_root + 'goods/goods-edit',
    refund: _api_root + 'adminer/apply-delete',
    applycheck: _api_root + 'adminer/share-check',
    checkopr: _api_root + 'adminer/share-status',
    getattr: _api_root + 'goods/getattr',
    inputbarcode: _api_root + 'goods/editbarcode',
    bookrefund: _api_root + 'adminer/refund',
    userlist: _api_root + 'adminer/user-list',
    userinfo: _api_root + 'adminer/get-user',
    setadmin: _api_root + 'adminer/set-admin',
    useredit: _api_root + 'adminer/user-edit',
    recharge: _api_root + 'adminer/recharge',
    analysis: _api_root + 'adminer/business-analysis',
    delexpress: _api_root + 'adminer/delete-express',
    editexpress: _api_root + 'adminer/save-express',
    getexpresss: _api_root + 'adminer/get-express',
    expressinfo: _api_root + 'adminer/express-info',
    withdraw: _api_root + 'adminer/withdraw',
    shopupdown: _api_root + 'adminer/shop-up-down',
    quickSend: _api_root + 'order/quick-send',
    clerk: _api_root + 'adminer/clerk',
    goodsPush: _api_root + 'adminer/goods-push',
    onpay_log: _api_root + 'onpay/get-detail',
    blacklist: _api_root + 'adminer/blacklist',
    goods_attr_edit: _api_root + 'adminer/goods-attr-edit',
    goodSaleList: _api_root + 'adminer/goods-sale-list',
  },
  workwechat: {
    checksession: _api_root + 'passport/qysession',
    userid: _api_root + 'passport/qyuserid',
  },
  rider: {
    comment: _api_root + 'rider/comment',
    index: _api_root + 'rider/index',
    work: _api_root + 'rider/switch-online',
    list: _api_root + 'rider/order-list',
    cancel: _api_root + 'rider/cancel-order',
    receive: _api_root + 'rider/receive-order',
    confirm: _api_root + 'rider/confirm-delivery',
    reportLocation: _api_root + 'rider/report-location',
    pickUp: _api_root + 'rider/get-order',
  },
};
module.exports = api;
